<%= stylesheet_link_tag "layout.css"%>
<% @utc_flag = 0 %>

<div align="left" style="padding: 0px 20px 0px 20px;">
<h1>Event Name: <%= @event.name %></h1>
<h5>Description: <%= @event.description %></h5>
</div>


<div align="left" style="padding: 0px 20px 0px 20px;">
<a id="linkButton" href="/endar_user/new/<%= @event.id %>">Add User</a>
<a id="linkButton" href="/endar_event/create_best_ics">Create ICS for best time</a>
<strong>Current Event ID: <%= @event.id -%></strong>
<!--
<%= link_to "Add User", {:controller => 'endar_user', :action => 'new', :id => @event.id} %> . 
<%=link_to "Create ICS for best time", {:controller => 'endar_event', :action => 'create_best_ics'}%>
<strong>Current Event ID: <%= @event.id -%></strong>
-->

<br /><br />
</div>

<div id="flashcontent" align="center">
  <strong>You need to upgrade your Flash Player</strong>
  This is replaced by the Flash content. 
  Place your alternate content here and users without the
  Flash plugin or with Javascript turned off will see this.
  Content here allows you to leave out <code>noscript</code>
  tags.
</div>



<div class="row">
<p><b>3</b> Best Times with a duration of: <b><%= @event.duration %></b> minute(s)</p>
<ol>
	<%if @best.nil? -%> 
			<strong>Couldn't find the top 3 best time for the current meeting</strong>
	
	<%else -%>
		<% 	session[:best] = @best
			@best.each do |b| 	
		%>
			<li><%= b.date_begin %> to <%= b.date_end %> (<%= b.count %>)</li>
		<% end %>
		
	<%end -%> 
</ol>
<br>
<hr/>
<!--
<p><b>All Times</b></p>
<% @event_times.each do |e| %>
	
		<%= e.date_begin %> to <%= e.date_end %> (<%= e.count %>)
		<br/>
	
<% end %>
<br/>
<hr/>
-->
<p>All Users</p>
<% @users.each do |u| %>
	<%= u.name %>
	<br>
<% end %>

<p>Responded</p>
<% @responded.each do |u| %>
	<%= u.name %>
	<br>
<% end %>

<p>Not responded</p>
<% @not_responded.each do |u| %>
	<%= u.name %>
	<br>
<% end %>


<br/>
 
<script type="text/javascript">
  // <![CDATA[
 
  // path_to_swf, swf_id, width, height, fp_version, bgcolor
  var so = new SWFObject(
    "/bin/Endar.swf", "Endar", "900", "650", "9", "#FFF"
  );
  //so.addVariable("eventID", "#{@event.id}");  
  so.write("flashcontent");  
  
  // ]]>
</script>